<?php

namespace App\Observers;

use App\Http\Controllers\web\ProductController;
use App\Models\StoreProduct;

class ProductObserver
{
    /**
     * Handle the StoreProduct "created" event.
     *
     * @param \App\Models\StoreProduct $storeProduct
     * @return void
     */
    public function created(StoreProduct $storeProduct)
    {
        //
    }

    /**
     * Handle the StoreProduct "updated" event.
     *
     * @param \App\Models\StoreProduct $storeProduct
     * @return void
     */
    public function updated(StoreProduct $storeProduct)
    {
        $res = new ProductController();
        $res->rankList();
    }

    /**
     * Handle the StoreProduct "deleted" event.
     *
     * @param \App\Models\StoreProduct $storeProduct
     * @return void
     */
    public function deleted(StoreProduct $storeProduct)
    {
        //
    }

    /**
     * Handle the StoreProduct "restored" event.
     *
     * @param \App\Models\StoreProduct $storeProduct
     * @return void
     */
    public function restored(StoreProduct $storeProduct)
    {
        //
    }

    /**
     * Handle the StoreProduct "force deleted" event.
     *
     * @param \App\Models\StoreProduct $storeProduct
     * @return void
     */
    public function forceDeleted(StoreProduct $storeProduct)
    {
        //
    }
}
